#include<stdio.h>

int findLongest(char str[]);

int main()
{
	char src[100];
	gets(src);
	
	int result = findLongest(src);
	
	printf("\n%d", result);
	
	return 0;
} 

int findLongest(char str[])
{
	int i = 0;
	int len = 0, lLoc = 0, loc = 0;
	
	while(str[i] != '\0')
	{
		while(str[i] == ' ') 
		{
			i ++;
		}
		lLoc = i;
		while(str[i] != '\0' && str[i] != ' ')
		{
			i ++;
		}
		if (i - lLoc > len)
		{
			len = i - lLoc;
			loc = lLoc;
		}
	}
	
	printf("\nThe longest length of the character string is: ");
	for (i = loc; i < loc + len; i ++)
	{
		printf("%c", str[i]);
	}
	
	return len;
}
